import {
    baseUrl,
    doRequestPost,
    doRequestDel,
    doRequestPut,
    doRequestGet
} from '@/utils/request'

export function noticeTagAll() {
    return doRequestGet(baseUrl + 'cms/notice/tag/all' + '?time=' + (+new Date()), {})
}
// 基金
export function fundnoticeTagAll() {
    return doRequestGet(baseUrl + 'cms/ann/class/fund/listAll' + '?time=' + (+new Date()), {})
}
// 股票
export function stocknoticeTagAll() {
    return doRequestGet(baseUrl + 'cms/ann/class/stock/listAll' + '?time=' + (+new Date()), {})
}
// 新三板
export function thrboardnoticeTagAll() {
    return doRequestGet(baseUrl + 'cms/ann/class/thrboard/listAll' + '?time=' + (+new Date()), {})
}
// 债券
export function bondnoticeTagAll() {
    return doRequestGet(baseUrl + 'cms/ann/class/bond/listAll' + '?time=' + (+new Date()), {})
}
// export function noticeinfoList(query) {
//     return doRequestPost(baseUrl + 'cms/noticeinfo/list' + '?time=' + (+new Date()), query)
// }
export function noticeinfoList(query) {
    return doRequestPost(baseUrl + 'cms/ann/list' + '?time=' + (+new Date()), query)
}

// 获取问询函件的列表数据
export function inquiryList(query) {
    return doRequestPost(baseUrl + 'cms/inquiryletter/list' + '?time=' + (+new Date()), query)
}

export function noticeinfoOnline(query) {
    return doRequestPost(baseUrl + 'cms/noticeinfo/online' + '?time=' + (+new Date()), query)
}

// 获取问询函上线的状态
export function inquiryOnline(query) {
    return doRequestPost(baseUrl + 'cms/inquiryletter/online' + '?time=' + (+new Date()), query)
}

export function noticeinfoOnlinenew(query) {
    return doRequestPost(baseUrl + 'cms/ann/online' + '?time=' + (+new Date()), query)
}
export function getAnnouncementContent(query) {
    return doRequestPost(baseUrl + 'cms/noticeinfo/content' + '?time=' + (+new Date()), query)
}

// 获取问询函的内容
export function getInquiryContent(query) {
    return doRequestPost(baseUrl + 'cms/inquiryletter/content' + '?time=' + (+new Date()), query)
}

export function getAnnouncementContentnew(query) {
    return doRequestPost(baseUrl + 'cms/ann/content' + '?time=' + (+new Date()), query)
}

// 解决 问询函
export function resolveInquiryContent(query) {
    return doRequestPost(baseUrl + 'cms/inquiryletter/resolve' + '?time=' + (+new Date()), query, {
        timeout: 60000
    })
}


export function resolveAnnouncementContent(query) {
    return doRequestPost(baseUrl + 'cms/noticeinfo/resolve' + '?time=' + (+new Date()), query, {
        timeout: 60000
    })
}

// 保存问询函
export function saveInquiryContent(query) {
    return doRequestPost(baseUrl + 'cms/inquiryletter/save' + '?time=' + (+new Date()), query)
}

export function saveAnnouncementContent(query) {
    return doRequestPost(baseUrl + 'cms/noticeinfo/save' + '?time=' + (+new Date()), query)
}
export function saveAnnouncementContentnew(query) {
    return doRequestPost(baseUrl + 'cms/ann/save' + '?time=' + (+new Date()), query)
}

// export function tagUpdate(query) {
//     return doRequestPost(baseUrl + 'cms/notice/tag/update' + '?time=' + (+new Date()), query)
// }

//编辑标签
export function tagUpdate(tagName,query) {
    return doRequestPost(baseUrl + `cms/ann/${tagName}/update` + '?time=' + (+new Date()), query)
}